<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

<div class="panel-heading">
	<ul class="nav nav-tabs">
		<li class="active"><a href="#one" data-toggle="tab">留言板</a></li>
	</ul>
</div>
<div class="panel-body">
	<div id="myTabContent" class="tab-content">
		<div class="tab-pane fade active in" id="one">
		  <div class="form-group">
        <label for="c-gps" class="control-label col-xs-12 col-sm-2">留言:</label>
        <div class="col-xs-12 col-sm-10">
		<div id="table" class="toolbar">
                        {:build_toolbar('refresh,add,del')}
                        <div class="dropdown btn-group {:$auth->check('notice/message/multi')?'':'hide'}">
                            <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> 开启/结束</a>
                            <ul class="dropdown-menu text-left" role="menu">
                                <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> 设为开启</a></li>
                                <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> 设为结束</a></li>
                            </ul>
                        </div>
                    </div>
					
		<table id="tableLogMessage" class="table table-striped table-bordered table-hover" 
			   data-operate-edit="{:$auth->check('school/school/edit')}" 
			   data-operate-del="{:$auth->check('school/school/del')}" 
			   width="100%">
		</table>
			<div id="table" class="toolbar">
                        {:build_toolbar('refresh,del')}
                    </div>
		<table id="tableMessage" class="table table-striped table-bordered table-hover" 
			   data-operate-edit="{:$auth->check('school/school/edit')}" 
			   data-operate-del="{:$auth->check('school/school/del')}" 
			   width="100%">
		</table>
		</div>
    </div>
		</div>
	</div>
</div>



	
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script>
// 初始化表格参数配置
            Table.api.init({
                extend: {
                    index_url: 'train/train/Messagelist',
                    add_url: 'notice/message/add',
                    edit_url: 'notice/message/edit',
                    del_url: 'notice/message/del',
                    multi_url: 'notice/message/multi',
                    table: 'tableMessage',
                }
            });

            var table = $("#tableMessage");

            // 初始化表格
            table.bootstrapTable({
                url: $.fn.bootstrapTable.defaults.extend.index_url,
                pk: 'id',
                sortName: 'id',
				exportTypes: ['excel'],
				toolbar :'#table',
                columns: [
                    [
                        {checkbox: true},
                        {field: 'id', title: __('Id')},
                        {field: 'name', title: '名称'},
						{field: 'content', title: '留言板内容'},
                        {field: 'createtime', title: __('Createtime'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
                        {field: 'status', title: __('Status'), formatter: Table.api.formatter.status},
                        {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
                    ]
                ]
            });

            // 为表格绑定事件
            Table.api.bindevent(table);
			
			
			// 初始化表格参数配置
            Table.api.init({
                extend: {
                    index_url: 'train/train/Messagelistlog',
                    add_url: 'notice/messagelog/add',
                    edit_url: 'notice/messagelog/edit',
                    del_url: 'notice/messagelog/del',
                    multi_url: 'notice/messagelog/multi',
                    table: 'tableLogMessage',
                }
            });

            var table01 = $("#tableLogMessage");

            // 初始化表格
            table01.bootstrapTable({
                url: $.fn.bootstrapTable.defaults.extend.index_url,
                pk: 'id',
                sortName: 'id',
				exportTypes: ['excel'],
				toolbar :'#table',
                columns: [
                    [
                        {checkbox: true},
                        {field: 'id', title: __('Id')},
						{field: 'num', title: '进修编号'},
                        {field: 'name', title: '姓名'},
						{field: 'content', title: '留言板内容'},
                        {field: 'createtime', title: __('Createtime'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
                        {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
                    ]
                ]
            });

            // 为表格绑定事件
            Table.api.bindevent(table01);
</script>


